<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
	<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
	<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
	
	<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<title>后台管理</title>
</head>

<body class="body_ifm">
	<div id="infobox2" style="display:none;">
	 	<div class="admin_com_t_box"> 
		    <form action="index.php?m=admin_once&c=ctime" target="supportiframe" method="post" id="formstatus">
		      	<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
		      	<div class="admin_com_smbox_list"><span class="admin_com_smbox_span">延长时间：</span>
		       		<input  class="admin_com_smbox_text" value="" name="endtime" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')">
		        	<span class="admin_com_smbox_list_s">天</span>
		      	</div>
		      	<div class="admin_com_smbox_opt">
				 	<input type="submit" onclick="loadlayer();" value='确认' class="admin_examine_bth">
				 	<input type="button"  onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'>
				 </div>
		      	<input name="onceids" value="0" type="hidden">
		    </form>
	  	</div>
	</div>
	
	<div class="infoboxp">
		<div class="tabs_info">
			<ul>
				<li class="curr"><a href="index.php?m=admin_once">店铺招聘</a></li>
				<li><a href="index.php?m=admin_once&c=set">店铺设置</a></li>
			</ul>
		</div>
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了网站所有的店铺招聘信息，可对店铺招聘进行审核删除操作。</div>
<div class="admin_new_tip_list">可输入名称关键字进行搜索，也可进行详细的高级搜索。</div>
</div>
</div>

<div class="clear"></div>

<div class="admin_new_search_box"> 
 <form method="get" action="index.php" name="myform" >
    <input type="hidden" name="m" value="admin_once"/>
    <input type="hidden" name="status" value="{yun:}$smarty.get.status{/yun}"/>
	<div class="admin_new_search_name">搜索类型：</div>
    <div class="admin_Filter_text formselect" did="dtype">
      <input type="button" {yun:}if $smarty.get.type==''||$smarty.get.type=='2'{/yun} value="职位名称" {yun:}elseif $smarty.get.type=='3'{/yun} value="联系电话" {yun:}elseif $smarty.get.type=='4'{/yun} value="联系人" {yun:}elseif $smarty.get.type=='5'{/yun} value="店铺名"{yun:}/if{/yun} class="admin_Filter_but" id="btype">
      <input type="hidden" name="type" id="type" value="{yun:}if $smarty.get.type{/yun}{yun:}$smarty.get.type{/yun}{yun:}else{/yun}2{yun:}/if{/yun}"/>
      <div class="admin_Filter_text_box" style="display:none" id="dtype">
        <ul>
          <li><a href="javascript:void(0)" onClick="formselect('2','type','职位名称')">职位名称</a></li>
          <li><a href="javascript:void(0)" onClick="formselect('3','type','联系电话')">联系电话</a></li>
          <li><a href="javascript:void(0)" onClick="formselect('4','type','联系人')">联系人</a></li>
          <li><a href="javascript:void(0)" onClick="formselect('5','type','店铺名')">店铺名</a></li>
        </ul>
      </div>
    </div>
    <input type="text" placeholder="输入你要搜索的关键字" name="keyword" class="admin_Filter_search" value="{yun:}$smarty.get.keyword{/yun}">
    <input type="submit" value="搜索" class="admin_Filter_bth">
	<a  href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();"   class="admin_new_search_gj">高级搜索</a></form>


  
  {yun:}include file="admin/admin_search.htm"{/yun}
  </div>
<div class="clear"></div> 
	<div class="admin_statistics">
            数据统计：
		<em class="admin_statistics_s">总数：<span class="ajaxonceall">0</span></em>
		<em class="admin_statistics_s">未审核：<span class="onceStatusNum1">0</span></em>
 		<em class="admin_statistics_s">已过期：<span class="onceStatusNum2">0</span></em>
		搜索结果：<span>{yun:}$total{/yun}</span>；
	</div>
<div class="table-list">
    <div class="admin_table_border">
      <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
      <form action="index.php" target="supportiframe" name="myform" id='myform' method="get">
        <input name="m" value="admin_once" type="hidden"/>
        <input name="c" value="del" type="hidden"/>
        <table width="100%">
          <thead>
            <tr class="admin_table_top">
              <th ><label for="chkall">
                <input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/>
                </label></th>
              <th> {yun:}if $smarty.get.t=="id" && $smarty.get.order=="asc"{/yun} <a href="index.php?m=admin_once&order=desc&t=id">编号<img src="images/sanj.jpg"/></a> {yun:}else{/yun} <a href="index.php?m=admin_once&order=asc&t=id">编号<img src="images/sanj2.jpg"/></a> {yun:}/if{/yun} </th>
            
              <th align="left">职位名称/店铺名</th>
          	  <th align="left">店铺形象</th>
              <th align="left">联系电话</th>
              <th align="left">联系人</th>
              <th> {yun:}if $smarty.get.t=="ctime" && $smarty.get.order=="asc"{/yun} <a href="index.php?m=admin_once&order=desc&t=ctime">发布时间<img src="images/sanj.jpg"/></a> {yun:}else{/yun} <a href="index.php?m=admin_once&order=asc&t=ctime">发布时间 <img src="images/sanj2.jpg"/></a> {yun:}/if{/yun} </th>
              <th> {yun:}if $smarty.get.t=="edate" && $smarty.get.order=="asc"{/yun} <a href="index.php?m=admin_once&order=desc&t=edate">结束时间<img src="images/sanj.jpg"/></a> {yun:}else{/yun} <a href="index.php?m=admin_once&order=asc&t=edate">结束时间 <img src="images/sanj2.jpg"/></a> {yun:}/if{/yun} </th>
              <th>状态</th>
              	<th>站点</th>
              <th class="admin_table_th_bg">操作</th>
            </tr>
          </thead>
          <tbody>
          
          {yun:}foreach item=v key=key from=$rows{/yun}
          <tr align="center"{yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.id{/yun}">
            <td><input type="checkbox" class="check_all" value="{yun:}$v.id{/yun}"  name='del[]' onclick='unselectall()' rel="del_chk" /></td>
            <td align="left" class="td1" style="text-align:center;"><span>{yun:}$v.id{/yun}</span></td>
          <td class="od" align="left">
		  <a class="admin_cz_sc" href="{yun:}url m=once c=show id=$v.id{/yun}" target="_blank">{yun:}$v.title{/yun}</a>
		  <div class="mt8">{yun:}$v.companyname{/yun}</div></td>
          <td align="left">
		  {yun:}if $v.pic{/yun}
		  <img src="{yun:}$v.pic_n{/yun}" width='50' height='50'>
		  {yun:}else{/yun}无
		  {yun:}/if{/yun}
          </td>
          <td align="left">{yun:}$v.phone{/yun}</td>
            <td align="left">{yun:}$v.linkman{/yun}</td>
            <td>{yun:}$v.ctime|date_format:"%Y-%m-%d"{/yun}</td>
            <td>{yun:}if $v.edate<=time(){/yun}<font color="orange">{yun:}$v.edate|date_format:"%Y-%m-%d"{/yun}</font>{yun:}else{/yun}{yun:}$v.edate|date_format:"%Y-%m-%d"{/yun}{yun:}/if{/yun}</td>
            <td>
            	{yun:}if $v.edate<=time(){/yun}
            		<span class="admin_com_Lock">已过期</span>
            	{yun:}elseif $v.status==1{/yun}
            		<span class="admin_com_Audited">已审核</span>
            	{yun:}elseif $v.status==0{/yun}
            		<span class="admin_com_noAudited">未审核</span>
            	{yun:}/if{/yun}

				{yun:}if $v.pay>0{/yun}
            		{yun:}if $v.pay==1{/yun}
            			<span class="admin_com_Lock">未付款</span>
            		{yun:}else if $v.pay==2{/yun}
            			<span class="admin_com_Audited">已付款</span>
            		{yun:}/if{/yun}	
            	{yun:}/if{/yun}
            	
            </td>
                      <td align="center">
               <div>{yun:}$Dname[$v.did]{/yun}</div>
              <div>
                <a href="javascript:;" onclick="checksite('{yun:}$v.companyname{/yun}','{yun:}$v.id{/yun}','index.php?m=admin_once&c=checksitedid');" class="admin_company_xg_icon">
                <span class="admin_company_xg_icon">重新分配</span>
                </a>
              </div>
            </td>
            <td>
             <div class="admin_new_bth_c">
             <a href="javascript:void(0)" class="admin_new_c_bth admin_new_c_bthsh" onClick="show_status('{yun:}$v.id{/yun}');">审核</a> 
             <a href="index.php?m=admin_once&c=show&id={yun:}$v.id{/yun}" class="admin_new_c_bth admin_new_c_bth_yl">查看</a>
             </div>
            <a href="index.php?m=admin_once&c=edit&id={yun:}$v.id{/yun}"class="admin_new_c_bth ">修改</a> 
            <a href="javascript:void(0)" onClick="layer_del('确定要删除？', 'index.php?m=admin_once&c=del&id={yun:}$v.id{/yun}');"class="admin_new_c_bth admin_new_c_bth_sc">删除</a></td>
          </tr>
          {yun:}/foreach{/yun}
          <tr >
            <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
            <td colspan="10" ><label for="chkAll2">全选</label>
              &nbsp;
              <input  class="admin_button" type="button" name="delsub" value="删除所选" onClick="return really('del[]')" />
              &nbsp;&nbsp;
              <input  class="admin_button" type="button" name="delsub" value="批量审核" onClick="audall('1');" />
              &nbsp;&nbsp;
              <input  class="admin_button" type="button" name="delsub" value="批量取消审核" onClick="audall('0');" />
              &nbsp;&nbsp;
              <input class="admin_button" type="button" onClick="audall2();" value="批量延期" >
            </td>
           </tr>
		   {yun:}if $total > $config.sy_listnum {/yun}
			<tr>
				{yun:}if $pagenum==1{/yun}
					<td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
					<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}else if $pagenum == $pages{/yun}
					<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}/if{/yun}
				<td colspan="8" class="digg">{yun:}$pagenav{/yun}</td>
			</tr>
		{yun:}/if{/yun}
          </tbody>
          
        </table>
        <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
      </form>
    </div>
  </div>
</div> 
<div id="preview" style="display:none;width:460px"> 
  <div style="overflow:auto;width:460px;" >
    <form method="post"  class="layui-form">
	<input id="statusid" type="hidden">
    <div class="adminonce_list_box">
    <div class="adminonce_list_tit">招聘内容</div>
    <div class="adminonce_list_p">
      <div class="adminonce_list">
       <span class="adminonce_name">职位名称：</span>
        <span class="adminonce_p" id="title"></span>
       
        <span class="adminonce_name_r">工  资：<em class="" id="salary"></em></span>
      </div>
      <div class="adminonce_list">
        <span class="adminonce_name">店面名称：</span>
       <span class="adminonce_p" id="companyname"></span>
      </div>
      <div class="adminonce_list">
        <span class="adminonce_name">具体要求：</span>
       <span class="adminonce_p">
       <div style="max-height:70px;_height:70px; overflow:hidden; overflow-y:auto;word-break:break-all; ">
       <div class="" id="require"></div>
       </div>
       
       </span>
       </div>
        </div>
        <div class="adminonce_list"> <span class="adminonce_name">发布时间：</span>
        <span class="adminonce_p" id="time"></span>
        <span class="adminonce_name_r">有效期：</span>
		<span class="adminonce_p" id="edate"></span>
      
       
      </div>
      <div class="adminonce_list_tit">联系方式</div>
      <div class="adminonce_list">
        <span class="adminonce_name">联系电话：</span>
        <span class="adminonce_p" id="phone"></span>
     
        <span class="adminonce_name_r">联系人：</span>
       <span class="adminonce_p" id="linkman"></span>
        </div>
  <div class="adminonce_list">
        <span class="adminonce_name">工作地点：</span>
        <span class="adminonce_p" id="address"></span>
         
      </div>
      
     
  <div style="padding:5px;border-top:1px solid #eee;margin-top:10px;">
   <div class="adminonce_list">
    <span class="adminonce_name" style=" font-weight:bold">审核操作：</span>
     
      
	   <div class="layui-form-item" style="margin-bottom:0px; margin-top:-8px;">
                  <div class="layui-input-block">
                    <div class="layui-input-inline">
                      	<input name="status" id="status_1" value="1" title="已审核" type="radio"/>
                    </div>
                    <div class="layui-input-inline">
                      	<input name="status" id="status_2" value="2" title="审核并确认订单" type="radio"/>
                    </div>
                  </div>
             </div>	  <input class="adminonce_list_bth" type="button" onClick="check_status();" value="提交"> </div>
	 
     </div>
      <div>
           <div >
   <div class="adminonce_list_bthbox"> </div>
   </div>    </div>	
     </div>
   </form>
  </div>
</div>
<script type="text/javascript">
  layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,$ = layui.$;
  });

$(document).ready(function() {
	$(".preview").hover(
		function(){  
			  var pic_url=$(this).attr('url');
			  layer.tips("<img src="+pic_url+" style='width:180px;height:180px;' >", this);
		  },
		function(){
		  layer.closeAll('tips');
		}
	); 
	$.get("index.php?m=admin_once&c=onceNum", function(data) {
		var datas = eval('(' + data + ')');
		if(datas.onceAllNum) {
			$('.ajaxonceall').html(datas.onceAllNum);
		}
		if(datas.onceStatusNum1) {
			$('.onceStatusNum1').html(datas.onceStatusNum1);
		}
		if(datas.onceStatusNum2) {
			$('.onceStatusNum2').html(datas.onceStatusNum2);
		}
		 
	});
});
function audall(status){
	var codewebarr="";
	$(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出 
		if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
	});
	if(codewebarr==""){
		parent.layer.msg("您还未选择任何信息！", 2, 8);	return false;			
	}else{	
		var pytoken=$("#pytoken").val();
		loadlayer();
		$.post("index.php?m=admin_once&c=status",{allid:codewebarr,status:status,pytoken:pytoken},function(data){	
			parent.layer.closeAll('loading');
			if(data=="1"){ 
				parent.layer.msg("批量审核成功！", 2, 9,function(){window.location.reload();}); 
			}else if(data=="3"){
				parent.layer.msg('店铺未付款！', 2, 8,function(){window.location.reload();});
			}else{
				parent.layer.msg('取消审核成功！', 2, 9,function(){window.location.reload();}); 
			}
		}); 
	}
} 
function audall2(){
	var codewebarr="";
	$(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出 
		if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
	});
	if(codewebarr==""){
		parent.layer.msg("您还未选择任何信息！",2,8);	return false;
	}else{
		$("input[name=onceids]").val(codewebarr);
 		$.layer({
			type : 1,
			title :'批量延期', 
			closeBtn : [0 , true],
			border : [10 , 0.3 , '#000', true],
			area : ['290px','180px'],
			offset: ['60px', ''],
			page : {dom :"#infobox2"}
		}); 		
	}
}
function show_status(id){ 
	$.get("index.php?m=admin_once&c=ajax&id="+id,function(data){
		var data=eval('('+data+')');
		$("#title").html(data.title);
		$("#companyname").html(data.companyname);
		$("#require").html(data.require_n);
		$("#address").html(data.address);
		$("#phone").html(data.phone);
		$("#salary").html(data.salary);
		$("#linkman").html(data.linkman);
		$("#city").html(data.city);
		$("#time").html(data.ctime_n);
		$("#edate").html(data.edate_n);
		
		$("#status_"+data.status).attr("checked","checked");
		 layui.use(['form'],function(){
			var form = layui.form;
			form.render();
		});
		$("#statusid").val(id);
		$.layer({
			type : 1,
			title : '审核操作',
			closeBtn : [0 , true], 
			offset : ['20%' , '30%'],
			border : [10 , 0.3 , '#000', true],
			area : ['460px','auto'],
			page : {dom : '#preview'}
		}); 
	})
}  
function check_status(){
	var id=$("#statusid").val();
	var pytoken=$("#pytoken").val();
	var status=$("input[name='status']:checked").val();
	loadlayer();
	$.post("index.php?m=admin_once&c=status",{allid:id,status:status,pytoken:pytoken},function(data){
		parent.layer.closeAll('loading');
		if(data=="1"){ 
			parent.layer.msg('审核成功！', 2, 9,function(){window.location.reload();});
		}else if(data=="3"){
			parent.layer.msg('店铺未付款！', 2, 8,function(){window.location.reload();});
		}else{
			parent.layer.msg('取消审核成功！', 2, 9,function(){window.location.reload();}); 
		}
	});
}
</script>
{yun:}include file="$adminstyle/checkdomain.htm"{/yun}
</body>
</html>
